﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:v="clr-namespace:ShredTheLog.Views;assembly=ShredTheLog.Views"
    xmlns:vm="clr-namespace:ShredTheLog.ViewModels;assembly=ShredTheLog.ViewModels"
    xmlns:cnv="clr-namespace:ShredTheLog.Converters;assembly=ShredTheLog.Converters"
    xmlns:generated="clr-namespace:ShredTheLog.Api;assembly=ShredTheLog.Generated"
    xmlns:c="clr-namespace:ShredTheLog.Controls;assembly=ShredTheLog.Controls"
    xmlns:s="clr-namespace:System;assembly=mscorlib"
    >

    <SolidColorBrush x:Key="BlueWindowBackgroundBrush" Color="#455A87"/>
    <SolidColorBrush x:Key="MainPanelBorderBrush" Color="#130C12"/>
    <SolidColorBrush x:Key="MainPanelBackgroundBrush" Color="#463E46"/>
    <Color x:Key="MainTabItemBackgroundColor">#5D80B4</Color>
    <SolidColorBrush x:Key="MainTabItemBackgroundBrush" Color="{StaticResource MainTabItemBackgroundColor}"/>
    <SolidColorBrush x:Key="BlackBorderBrush" Color="#040304"/>
    <SolidColorBrush x:Key="GrayPanelBackgroundBrush" Color="#49474F"/>

    <Style x:Key="WizButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Margin" Value="2"/>
        <Setter Property="Foreground" Value="#FCFDF9"/>
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="2, -1, 2, -1"/>
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <c:MultiBorder x:Name="border" Margin="2" BorderThickness="2" Opacity="0.8">
                                    <UIElement.Clip>
                                        <RectangleGeometry RadiusX="3" RadiusY="3">
                                            <RectangleGeometry.Rect>
                                                <MultiBinding Converter="{x:Static cnv:RectConverter.Default}">
                                                    <Binding ElementName="border" Path="ActualWidth"/>
                                                    <Binding ElementName="border" Path="ActualHeight"/>
                                                </MultiBinding>
                                            </RectangleGeometry.Rect>
                                        </RectangleGeometry>
                                    </UIElement.Clip>

                                    <c:MultiBorder.LeftBorderBrush>
                                        <LinearGradientBrush StartPoint="0, 0.5" EndPoint="1, 0.5">
                                            <GradientStop Offset="0" Color="#B5972D"/>
                                            <GradientStop Offset="1" Color="#80B5972D"/>
                                        </LinearGradientBrush>
                                    </c:MultiBorder.LeftBorderBrush>
                                    <c:MultiBorder.TopBorderBrush>
                                        <LinearGradientBrush StartPoint="0.5, 0" EndPoint="0.5, 1">
                                            <GradientStop Offset="0" Color="#B5972D"/>
                                            <GradientStop Offset="1" Color="#80B5972D"/>
                                        </LinearGradientBrush>
                                    </c:MultiBorder.TopBorderBrush>
                                    <c:MultiBorder.RightBorderBrush>
                                        <LinearGradientBrush StartPoint="1, 0.5" EndPoint="0, 0.5">
                                            <GradientStop Offset="0" Color="#B5972D"/>
                                            <GradientStop Offset="1" Color="#80B5972D"/>
                                        </LinearGradientBrush>
                                    </c:MultiBorder.RightBorderBrush>
                                    <c:MultiBorder.BottomBorderBrush>
                                        <LinearGradientBrush StartPoint="0.5, 1" EndPoint="0.5, 0">
                                            <GradientStop Offset="0" Color="#B5972D"/>
                                            <GradientStop Offset="1" Color="#80B5972D"/>
                                        </LinearGradientBrush>
                                    </c:MultiBorder.BottomBorderBrush>
                                </c:MultiBorder>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="outerBorder" Background="#3D5165" CornerRadius="3" Padding="1">
                        <Grid>
                            <c:MultiBorder x:Name="innermostBorder" BorderThickness="2" Background="#435469" Margin="1">
                                <c:MultiBorder.LeftBorderBrush>
                                    <LinearGradientBrush StartPoint="0, 0.5" EndPoint="1, 0.5">
                                        <GradientStop Offset="0" Color="#4C626E"/>
                                        <GradientStop Offset="1" Color="#485A71"/>
                                    </LinearGradientBrush>
                                </c:MultiBorder.LeftBorderBrush>
                                <c:MultiBorder.TopBorderBrush>
                                    <LinearGradientBrush StartPoint="0.5, 0" EndPoint="0.5, 1">
                                        <GradientStop Offset="0" Color="#4C626E"/>
                                        <GradientStop Offset="1" Color="#485A71"/>
                                    </LinearGradientBrush>
                                </c:MultiBorder.TopBorderBrush>
                                <c:MultiBorder.RightBorderBrush>
                                    <LinearGradientBrush StartPoint="1, 0.5" EndPoint="0, 0.5">
                                        <GradientStop Offset="0" Color="#192E4D"/>
                                        <GradientStop Offset="1" Color="#33485B"/>
                                    </LinearGradientBrush>
                                </c:MultiBorder.RightBorderBrush>
                                <c:MultiBorder.BottomBorderBrush>
                                    <LinearGradientBrush StartPoint="0.5, 1" EndPoint="0.5, 0">
                                        <GradientStop Offset="0" Color="#142548"/>
                                        <GradientStop Offset="1" Color="#294456"/>
                                    </LinearGradientBrush>
                                </c:MultiBorder.BottomBorderBrush>
                                
                                <ContentPresenter x:Name="contentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}"/>
                            </c:MultiBorder>
                            <Border x:Name="innerBorder1" CornerRadius="3" BorderThickness="1, 1, 0, 0" BorderBrush="#0B163C"/>
                            <Border x:Name="innerBorder2" CornerRadius="3" BorderThickness="0, 0, 1, 1" BorderBrush="#050741"/>
                        </Grid>
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDefault" Value="True">
                        </Trigger>

                        <Trigger Property="IsKeyboardFocused" Value="true">
                        </Trigger>

                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="outerBorder" Property="Background" Value="#354A57"/>
                            <Setter TargetName="innerBorder1" Property="BorderBrush" Value="#050741"/>
                            <Setter TargetName="innerBorder2" Property="BorderBrush" Value="#0B163C"/>
                            <Setter TargetName="innermostBorder" Property="Background" Value="#3F5673"/>
                            <Setter TargetName="innermostBorder" Property="LeftBorderBrush">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0, 0.5" EndPoint="1, 0.5">
                                        <GradientStop Offset="0" Color="#142548"/>
                                        <GradientStop Offset="1" Color="#33485B"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="innermostBorder" Property="TopBorderBrush">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0.5, 0" EndPoint="0.5, 1">
                                        <GradientStop Offset="0" Color="#142548"/>
                                        <GradientStop Offset="1" Color="#33485B"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="innermostBorder" Property="RightBorderBrush">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="1, 0.5" EndPoint="0, 0.5">
                                        <GradientStop Offset="0" Color="#4C626E"/>
                                        <GradientStop Offset="1" Color="#485A71"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="innermostBorder" Property="BottomBorderBrush">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0.5, 1" EndPoint="0.5, 0">
                                        <GradientStop Offset="0" Color="#4C626E"/>
                                        <GradientStop Offset="1" Color="#485A71"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="contentPresenter" Property="RenderTransform">
                                <Setter.Value>
                                    <TranslateTransform X="1" Y="1"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#414042"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="GoButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Margin" Value="2"/>
        <Setter Property="Width" Value="60"/>
        <Setter Property="Height" Value="19"/>
        <Setter Property="Foreground" Value="#FCFDF9"/>
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="2, -2, 2, 0"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <ControlTemplate.Resources>
                        <PathGeometry x:Key="GoButtonGeometry">
                            <PathFigure StartPoint="55, 0">
                                <BezierSegment Point1="55, 0" Point2="61, 9.5" Point3="60, 19"/>
                                <LineSegment Point="0, 19"/>
                                <BezierSegment Point1="0, 19" Point2="-1, 9.5" Point3="5, 0"/>
                            </PathFigure>
                        </PathGeometry>
                    </ControlTemplate.Resources>
                    
                    <Grid x:Name="panel">
                        <Viewbox>
                            <Path Fill="Black" Data="{StaticResource GoButtonGeometry}"/>
                        </Viewbox>
                        <Viewbox RenderTransformOrigin="0.5, 0.5">
                            <Viewbox.RenderTransform>
                                <ScaleTransform ScaleX="0.95" ScaleY="0.9"/>
                            </Viewbox.RenderTransform>
                            <c:MultiBorder x:Name="border" Background="#868D96" Width="60" Height="19" Clip="{StaticResource GoButtonGeometry}" BorderThickness="4, 3, 4, 3">
                                <c:MultiBorder.LeftBorderBrush>
                                    <LinearGradientBrush StartPoint="0, 0.5" EndPoint="1, 0.5">
                                        <GradientStop Offset="0" Color="#696E78"/>
                                        <GradientStop Offset="0.333" Color="#767C81"/>
                                        <GradientStop Offset="0.667" Color="#696E78"/>
                                        <GradientStop Offset="1" Color="#9AA1A9"/>
                                    </LinearGradientBrush>
                                </c:MultiBorder.LeftBorderBrush>
                                <c:MultiBorder.TopBorderBrush>
                                    <LinearGradientBrush StartPoint="0.5, 0" EndPoint="0.5, 1">
                                        <GradientStop Offset="0" Color="#9FA6AE"/>
                                        <GradientStop Offset="0.5" Color="#9CA2AA"/>
                                        <GradientStop Offset="1" Color="#90979F"/>
                                    </LinearGradientBrush>
                                </c:MultiBorder.TopBorderBrush>
                                <c:MultiBorder.RightBorderBrush>
                                    <LinearGradientBrush StartPoint="1, 0.5" EndPoint="0, 0.5">
                                        <GradientStop Offset="0" Color="#696E78"/>
                                        <GradientStop Offset="0.333" Color="#767C81"/>
                                        <GradientStop Offset="0.667" Color="#696E78"/>
                                        <GradientStop Offset="1" Color="#9AA1A9"/>
                                    </LinearGradientBrush>
                                </c:MultiBorder.RightBorderBrush>
                                <c:MultiBorder.BottomBorderBrush>
                                    <LinearGradientBrush StartPoint="0.5, 1" EndPoint="0.5, 0">
                                        <GradientStop Offset="0" Color="#0B0E11"/>
                                        <GradientStop Offset="0.5" Color="#242C3A"/>
                                        <GradientStop Offset="1" Color="#374147"/>
                                    </LinearGradientBrush>
                                </c:MultiBorder.BottomBorderBrush>
                            </c:MultiBorder>
                        </Viewbox>
                        <ContentPresenter x:Name="contentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}"/>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDefault" Value="True">
                        </Trigger>

                        <Trigger Property="IsKeyboardFocused" Value="true">
                        </Trigger>

                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Foreground" Value="White"/>
                        </Trigger>

                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="border" Property="Background" Value="#8B9299"/>
                            <Setter TargetName="border" Property="BorderThickness" Value="4, 3, 4, 1"/>
                            <Setter TargetName="contentPresenter" Property="RenderTransform">
                                <Setter.Value>
                                    <TranslateTransform X="0" Y="1"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#3E4247"/>
                            <Setter TargetName="border" Property="Background" Value="#656A72"/>
                            <Setter TargetName="border" Property="LeftBorderBrush">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0, 0.5" EndPoint="1, 0.5">
                                        <GradientStop Offset="0" Color="#5E6168"/>
                                        <GradientStop Offset="0.333" Color="#656A72"/>
                                        <GradientStop Offset="0.667" Color="#5A5E67"/>
                                        <GradientStop Offset="1" Color="#7E8286"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="border" Property="TopBorderBrush">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0.5, 0" EndPoint="0.5, 1">
                                        <GradientStop Offset="0" Color="#898D90"/>
                                        <GradientStop Offset="0.5" Color="#86898E"/>
                                        <GradientStop Offset="1" Color="#767C81"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="border" Property="RightBorderBrush">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="1, 0.5" EndPoint="0, 0.5">
                                        <GradientStop Offset="0" Color="#5E6168"/>
                                        <GradientStop Offset="0.333" Color="#656A72"/>
                                        <GradientStop Offset="0.667" Color="#5A5E67"/>
                                        <GradientStop Offset="1" Color="#7E8286"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="border" Property="BottomBorderBrush">
                                <Setter.Value>
                                    <LinearGradientBrush StartPoint="0.5, 1" EndPoint="0.5, 0">
                                        <GradientStop Offset="0" Color="#08090B"/>
                                        <GradientStop Offset="0.5" Color="#171B22"/>
                                        <GradientStop Offset="1" Color="#232933"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="LightButtonStyle" TargetType="{x:Type ButtonBase}">
        <Setter Property="Foreground" Value="#030304"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ButtonBase}">
                    <Grid x:Name="Grid">
                        <c:MultiBorder x:Name="border" BorderThickness="1" LeftBorderBrush="White" TopBorderBrush="White" RightBorderBrush="#475673" BottomBorderBrush="#475673" Background="#BAD0E4">
                            <ContentPresenter x:Name="contentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}"/>
                        </c:MultiBorder>

                        <Rectangle x:Name="DisabledVisualElement" Fill="White" IsHitTestVisible="False" Opacity="0.5" Visibility="Collapsed"/>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                        </Trigger>

                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="border" Property="LeftBorderBrush" Value="#475673"/>
                            <Setter TargetName="border" Property="TopBorderBrush" Value="#475673"/>
                            <Setter TargetName="border" Property="RightBorderBrush" Value="White"/>
                            <Setter TargetName="border" Property="BottomBorderBrush" Value="White"/>
                            <Setter TargetName="contentPresenter" Property="RenderTransform">
                                <Setter.Value>
                                    <TranslateTransform X="1" Y="1"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Visibility" TargetName="DisabledVisualElement" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        
        <!--<Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Foreground" Value="#415C88"/>
            </Trigger>
        </Style.Triggers>-->
    </Style>
    
</ResourceDictionary>